<script setup>
const props = defineProps({
  modelValue: {
    type: Number,
    default: 0,
    required: true
  }
})
const emits = defineEmits(['update:modelValue'])
// emits====this.$emit

function btnClick2 () {
  emits('update:modelValue', Date.now())
}
</script>
<template>
  <div>我是子组件</div>
  <div>父给子的money:{{ modelValue }}</div>
  <button @click="btnClick2">使用v-model模式处理父子组件传值</button>
</template>
<style></style>
